* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: Arial, sans-serif;
}

.game-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#game-board {
    width: 300px;
    height: 600px;
    border: 2px solid #333;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    background-color: #f8f8f8;
}

.cell {
    border: 1px solid #ccc;
    background-color: transparent;
}

.cell.filled {
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.game-info {
    width: 200px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.score-box, .next-piece, .controls {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

h2 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.2em;
}

#score {
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
}

#next-piece-display {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
}

.controls p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #666;
}

#start-btn {
    padding: 10px 20px;
    font-size: 1.1em;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#start-btn:hover {
    background-color: #27ae60;
}

/* 方块颜色 */
.piece-I { background-color: #00f0f0; }
.piece-O { background-color: #f0f000; }
.piece-T { background-color: #a000f0; }
.piece-S { background-color: #00f000; }
.piece-Z { background-color: #f00000; }
.piece-J { background-color: #0000f0; }
.piece-L { background-color: #f0a000; }